
#ifndef __LED_H
#define __LED_H

#include "tenx_TM56F1522.h"


enum EVENT_TYPE
{
    EVENT_TIME0 = 0X01,
    EVENT_CHARGE = 0x02,
    EVENT_20ms = 0x04,
    EVENT_Smoke = 0x08,
    EVENT_display_cnt = 0x10,
    EVENT_2s = 0x20,
    EVENT_shk_smoke = 0x40,
    EVENT_BAT_liq_SWITCH = 0x80,
};

extern unsigned int event;

#define event_set(x) (event |= x)
#define event_clr(x) (event &= ~x)

//油烟显示
#define  bat_display      0x05        
#define  ecig_display     0x06
#define  off_display      0


//数码管数字显示
#define  led1  0x02
#define  led2  0x01
#define  led3  0x40
#define  led4  0x20
#define  led5  0x10


#define LED1_IO  PB1
#define LED2_IO  PB0
#define LED3_IO  PA6
#define LED4_IO  PA5
#define LED5_IO  PA4


void LED_Init();
void HW_Led_Scan(unsigned int hun,unsigned int ten,unsigned int one);

#endif
